/**
 * related to orderListRowTemplate.ui
 * 
 * @Author : chenglm
 * @Timestamp : 2016-07-18
 */
var root=ui("$");
var imageView_logo = ui("imageView_logo");
var label_name = ui("label_name");
var label_payStatus = ui("label_payStatus");
var label_time = ui("label_time"); 
var label_address = ui("label_address"); 

//设置数据绑定的映射关系
root.setMapping({
	"imageView_logo.source":"buyerLogoFull",
	"label_name.text":"buyerNick",
	"label_payStatus.tag":"payStatus",
	"label_time.tag":"status",
	"label_time.text":"serviceTimeStr",
	"label_address.text":"address"
});

root.on("dataRefreshed", function(){
	var payStatus = label_payStatus.tag;
	if (payStatus == 1) { //1：未付款
		label_payStatus.text = "未付款";
	} else if (payStatus == 2) { //2：已付款
		if (label_time.tag == 1) {
			label_payStatus.text = "等待服务";
		} else {
			label_payStatus.text = "已服务";
		}
	}
});